const http = require('http')
const fs = require('fs')

const server = http.createServer((req, res) => {
    let url = req.url
    if (url === '/favicon.ico') {
        res.end('404')
        return
    }

    let str = fs.readFileSync(__dirname + url)
    res.end(str)

})

server.listen(80, () => {
    console.log('启动成功');
})